package com.yztstudy.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 类别的实体类
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "category")
public class Category implements Serializable {

    public static final Long serialVersionUID = 1L;

    // 成员变量

    @TableId(value = "category_id", type = IdType.AUTO)
    @JsonProperty("category_id")
    private Integer categoryId; // 种类主键

    @TableField(value = "category_name")
    @JsonProperty("category_name")
    private String categoryName; // 种类名称
}
